from pathlib import Path
import shutil

for item in Path().rglob("__pycache__"):
    if str(item.parents[-2]) == "venv": continue
    
    shutil.rmtree(item)